﻿@inherits BaseComponent
@if ( !HasCustomRegistration )
{
    <section @ref="@ElementRef" id="@ElementId" class="@ClassNames" style="@StyleNames" @attributes="@Attributes">
        <CascadingValue Value=this>
            @if ( Loading )
            {
                @if ( LoadingTemplate != null )
                {
                    @LoadingTemplate
                }
                else
                {
                    <div class="@LoadingClassNames"></div>
                }
            }
            @ChildContent
        </CascadingValue>
    </section>
}
else
{
    @RenderCustomComponent()
}